<div class="admin">
        <div class="panel admin-panel">
            <div class="panel-head"><strong>订单统计</strong></div>
            <div class="padding border-bottom">
                <div class="bg-back radius padding">
                    <h4>说明：</h4>
                    <p class="text-indent">1、符合以下任何一种条件的订单即为有效订单：1）采用在线支付方式支付并且已付款；2）采用货到付款方式支付并且交易已完成</p>
                    <p class="text-indent">2、以下关于订单和订单商品的筛选时间区间至多：30天。</p>
                </div>
            </div>
            <div class="bg-back radius padding">
                <form method="post" name="myform" id="myform" action="">
                    <tr>
                        <th><label for="query_start_time">订单时间</label></th>
                        <td><input type="text" value="{$time ? $time : date('Y-m')}" id="time" name="time" readonly="readonly"></td>
                        <td><input type="submit" value="查询" /></td>
                    </tr>
                </form>
            </div>
            <div class="padding border-bottom">
                <span>下单金额：{$order_res['order_amount']}</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>下单会员数：{$order_res['user_num']}</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>下单量：{$order_res['order_num']}</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>下单商品数：{$order_res['order_amount']}</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>商品平均价格：{$order_res['average']}</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>商品收藏量：{$order_res['order_amount']}</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>商品总数：{$fav_goods['collect_num']}</span>&nbsp;&nbsp;&nbsp;&nbsp;
                <span>店铺收藏量：{$collect['collect_num']}</span>&nbsp;&nbsp;&nbsp;&nbsp;
            </div>
            <div>
                <button class="button bg-main" id="sales">订单销量</button>
                <button class="button bg-sub" id="amount">订单金额</button>
            </div>
            <div class="sales">
                <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
                    <title></title>

                    <style type="text/css">
                        ${demo.css}
                    </style>
                    <script type="text/javascript">
                        $(function () {
                            $('#container').highcharts({
                                title: {
                                    text: '订单销量走势图',
                                    x: -20 //center
                                },
                                subtitle: {
                                    text: '订单销量统计',
                                    x: -20
                                },
                                xAxis: {
                                    categories: [{$same_month['day']}]
                                },
                                yAxis: {
                                    title: {
                                        text: '下单量 (单)'
                                    },
                                    plotLines: [{
                                        value: 0,
                                        width: 1,
                                        color: '#808080'
                                    }]
                                },
                                tooltip: {
                                    valueSuffix: '单'
                                },
                                legend: {
                                    layout: 'vertical',
                                    align: 'right',
                                    verticalAlign: 'middle',
                                    borderWidth: 0
                                },
                                series: [{
                                    name: '{$time ? $time : date('Y-m')}',
                                    data: [{$same_month['shuju']}]
                                }]
                            });
                        });
                    </script>
                </head>
                <body>
                <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
                <script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>

                <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
            </div>
            <div class="amount" >
                <head>
                    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
                    <title></title>

                    <style type="text/css">
                        ${demo.css}
                    </style>
                    <script type="text/javascript">
                        $(function () {
                            $('#container1').highcharts({
                                title: {
                                    text: '订单金额走势图',
                                    x: -20 //center
                                },
                                subtitle: {
                                    text: '订单金额统计',
                                    x: -20
                                },
                                xAxis: {
                                    categories: [{$order_amount['day']}]
                                },
                                yAxis: {
                                    title: {
                                        text: '下单金额 (元)'
                                    },
                                    plotLines: [{
                                        value: 0,
                                        width: 1,
                                        color: '#808080'
                                    }]
                                },
                                tooltip: {
                                    valueSuffix: '元'
                                },
                                legend: {
                                    layout: 'vertical',
                                    align: 'right',
                                    verticalAlign: 'middle',
                                    borderWidth: 0
                                },
                                series: [{
                                    name: '{$time ? $time : date('Y-m')}',
                                    data: [{$order_amount['shuju']}]
                                }]
                            });
                        });
                    </script>
                </head>
                <body>
                <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
                <script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>

                <div id="container1" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
            </div>
        </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        $(".amount").hide();
        $("#sales").click(function(){
            $(".amount").hide();
            $(".sales").show();
        });
        $("#amount").click(function(){
            $(".sales").hide();
            $(".amount").show();
        });
    });
</script>
<script type="text/javascript">
    $('#time').datetimepicker({
        lang:"ch",           //语言选择中文
        format:"Y-m",      //格式化日期
        timepicker:false,    //关闭时间选项
    });
</script>